﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace csctp
{
	/// <summary>
	/// 投资者持仓明细
	/// </summary>
	public class PositionField 
	{
		/// <summary>
		/// 合约代码
		/// </summary>
		[DisplayName("合约")]
		public string InstrumentID { get; set; }

		/// <summary>
		/// 买卖
		/// </summary>
		[DisplayName("买卖")]
		public DirectionType Direction { get; set; }

		/// <summary>
		/// 持仓均价
		/// </summary>
		[DisplayName("持仓均价")]
		public double Price { get; set; }

		/// <summary>
		/// 持仓总量
		/// </summary>
		[DisplayName("总持仓")]
		public int Position { get; set; }

		/// <summary>
		/// 昨仓
		/// </summary>
		[DisplayName("昨仓")]
		public int YdPosition { get; set; }

		/// <summary>
		/// 今仓
		/// </summary>
		[DisplayName("今仓")]
		public int TdPosition { get; set; }

		///// <summary>
		///// 可平量
		///// </summary>
		//public int PositionClose;

		/// <summary>
		/// 占用保证金
		/// </summary>
		//public double Margin; //无此项便不再用查询

		/// <summary>
		/// 投机套保标志
		/// </summary>
		[DisplayName("投保")]
		public HedgeType Hedge { get; set; }

		/// <summary>
		/// 平仓盈亏
		/// </summary>
		[DisplayName("平仓盈亏")]
		public double CloseProfit { get; set; }

		/// <summary>
		/// 持仓盈亏
		/// </summary>
		[DisplayName("持仓盈亏")]
		public double PositionProfit { get; set; }

		/// <summary>
		/// 手续费
		/// </summary>
		[DisplayName("手续费")]
		public double Commission { get; set; }

		/// <summary>
		/// 保证金
		/// </summary>
		[DisplayName("保证金")]
		public double Margin { get; set; }
	}
}
